package cn.enzo.utils.tag;

import java.io.IOException;

import javax.servlet.ServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

public class BasePathTag extends TagSupport {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public int doEndTag() throws JspException {
			ServletRequest request = pageContext.getRequest();
			String contextPath = request.getServletContext().getContextPath();
			try {
				pageContext.getOut().print(contextPath);
			} catch (IOException e) {
				e.printStackTrace();
			}
		return super.doEndTag();
	}
	

}
